package com.nmsl.membership.controller;

import com.nmsl.common.core.domain.AjaxResult;
import com.nmsl.common.core.domain.R;
import com.nmsl.common.core.page.TableDataInfo;
import com.nmsl.membership.domain.MembershipLevel;
import com.nmsl.membership.domain.ValueStorage;
import com.nmsl.membership.domain.ValueStorageChangeRecord;
import com.nmsl.membership.service.IValueStorageChangeRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.nmsl.common.core.controller.BaseController;
import java.util.List;

import static com.nmsl.common.utils.PageUtils.startPage;
//会员变动记录
@RestController
@RequestMapping("/membership/selectjilulist")
public class ValueStorageChangeRecordController extends BaseController{
   @Autowired
    private IValueStorageChangeRecordService valueStorageChangeRecordService;


    @GetMapping("/list")
    public R list(Integer id)
    {
        System.out.println(id);
        System.out.println(valueStorageChangeRecordService.selectjilulist(id));
        List<ValueStorageChangeRecord> records = valueStorageChangeRecordService.selectjilulist(id);
        if(records.size() > 0){
            return R.ok(records);
        }else{
            return R.fail("暂无记录");
        }
    }


}
